<?php echo '新锐创想设计 请支持正版授权产品 <a href="http://addon.discuz.com/?@xinrui">http://addon.discuz.com/?@xinrui</a>';exit;?>
<div id="post_new"></div>
<div class="replyCom cfix">
	<form method="post" autocomplete="off" id="fastpostform" action="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&extra=$_GET[extra]&replysubmit=yes&mobile=2">
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<ul class="fastpost">
		<!--{if $_G[forum_thread][special] == 5 && empty($firststand)}-->
		<li class="cfix">
		<select id="stand" name="stand" >
			<option value="">{lang debate_viewpoint}</option>
			<option value="0">{lang debate_neutral}</option>
			<option value="1">{lang debate_square}</option>
			<option value="2">{lang debate_opponent}</option>
		</select>
		</li>
		<!--{/if}-->
		<li class="cfix"><textarea class="textarea input" tabindex="3" id="fastpostmessage" name="message" autocomplete="off" cols="80" rows="2" placeholder="{lang send_reply_fast_tip}" ></textarea></li>
		<!--<li><input type="text" value="{lang send_reply_fast_tip}" class="input" color="gray" name="message" id="fastpostmessage" fwin="reply"></li>-->
		<li class="cfix" id="fastpostsubmitline">
		<!--{if $secqaacheck || $seccodecheck}-->
			<!--{subtemplate common/seccheck}-->
		<!--{/if}-->
		</li>
		<li class="faceBox cfix">
			<ul>
				<li><img src="static/image/smiley/grapeman/01.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_41:}')" /></li>
				<li><img src="static/image/smiley/grapeman/02.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_42:}')" /></li>
				<li><img src="static/image/smiley/grapeman/03.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_43:}')" /></li>
				<li><img src="static/image/smiley/grapeman/04.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_44:}')" /></li>
				<li><img src="static/image/smiley/grapeman/05.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_45:}')" /></li>
				<li><img src="static/image/smiley/grapeman/06.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_46:}')" /></li>
				<li><img src="static/image/smiley/grapeman/07.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_47:}')" /></li>
				<li><img src="static/image/smiley/grapeman/08.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_48:}')" /></li>
				<li><img src="static/image/smiley/grapeman/09.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_49:}')" /></li>
				<li><img src="static/image/smiley/grapeman/10.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_50:}')" /></li>
				<li><img src="static/image/smiley/grapeman/11.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_51:}')" /></li>
				<li><img src="static/image/smiley/grapeman/12.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_52:}')" /></li>
				<li><img src="static/image/smiley/grapeman/13.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_53:}')" /></li>
				<li><img src="static/image/smiley/grapeman/14.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_54:}')" /></li>
				<li><img src="static/image/smiley/grapeman/15.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_55:}')" /></li>
				<li><img src="static/image/smiley/grapeman/16.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_56:}')" /></li>
				<li><img src="static/image/smiley/grapeman/17.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_57:}')" /></li>
				<li><img src="static/image/smiley/grapeman/18.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_58:}')" /></li>
				<li><img src="static/image/smiley/grapeman/19.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_59:}')" /></li>
				<li><img src="static/image/smiley/grapeman/20.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_60:}')" /></li>
				<li><img src="static/image/smiley/grapeman/21.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_61:}')" /></li>
				<li><img src="static/image/smiley/grapeman/22.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_62:}')" /></li>
				<li><img src="static/image/smiley/grapeman/23.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_63:}')" /></li>
				<li><img src="static/image/smiley/grapeman/24.gif" width="30" height="30" onClick="addface('fastpostmessage', '{:3_64:}')" /></li>
			</ul>
			<script src="template/xinrui_iuni/touch/images/js/get_face.js"></script>
		</li>
		<li class="cfix">
			<div class="rePostIcon z wp50">
				<a class="faceBtn" href="javascript:void(0);"></a>
				<a class="itBtn" href="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&reppost=$_G[forum_firstpid]&page=$page">{lang reply}</a>
			</div>
			<input type="button" value="{lang reply}" class="btn1 y wp35" name="replysubmit" id="fastpostsubmit" />
			<!--{hook/viewthread_fastpost_button_mobile}-->
		</li>
	</ul>
    </form>
</div>
<div class="btViewpost">
	<a class="viewBtn Jq_viewBtn" href="javascript:void(0);">我也要说两句</a>
	<table>
		<tr>
			<td>
				<div class="viewA vCom">
					<span><!--{if $thread[replies]>0}--><em><i>{$thread[replies]}</i></em><!--{/if}--></span>
					评论
				</div>
			</td>
			<td>
				<a href="home.php?mod=spacecp&ac=favorite&type=thread&id=$_G[tid]" class="viewA vFav">
					<span><!--{if $_G['forum_thread']['favtimes']>0}--><em><i>{$_G['forum_thread']['favtimes']}</i></em><!--{/if}--></span>
					{lang favorite}
				</a>
			</td>
			<!--{if ($_G['group']['allowrecommend'] || !$_G['uid']) && $_G['setting']['recommendthread']['status']}-->
			<!--{if !empty($_G['setting']['recommendthread']['addtext'])}-->
			<td>
				<a class="viewA vZan" id="recommend_add" href="forum.php?mod=misc&action=recommend&do=add&tid=$_G[tid]&hash={FORMHASH}" {if $_G['uid']}onclick="ajaxmenu(this, 3000, 1, 0, '43', 'recommendupdate({$_G['group']['allowrecommend']})');return false;"{else} onclick="showWindow('login', this.href)"{/if} onmouseover="this.title = $('recommendv_add').innerHTML + ' {lang activity_member_unit}$_G[setting][recommendthread][addtext]'" title="{lang maketoponce}">
				<span><!--{if $_G[forum_thread][recommend_add]>0}--><em><i>$_G[forum_thread][recommend_add]</i></em><!--{/if}--></span>
				赞
				</a>					
			</td>
			<!--{/if}-->
			<!--{/if}-->
		</tr>
	</table>
</div>
<div class="btRepPost" style="display:none;">
	<a href="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&reppost=$_G[forum_firstpid]&page=$page">
		<span class="inp z">我也要说两句</span>
		<span class="btn1 y">回复</span>
	</a>
</div>
<script type="text/javascript">
	(function() {
		var form = $('#fastpostform');
		<!--{if !$_G[uid] || $_G[uid] && !$allowpostreply}-->
		$('#fastpostmessage').on('focus', function() {
			<!--{if !$_G[uid]}-->
				popup.open('{lang nologin_tip}', 'confirm', 'member.php?mod=logging&action=login');
			<!--{else}-->
				popup.open('{lang nopostreply}', 'alert');
			<!--{/if}-->
			this.blur();
		});
		<!--{else}-->
		$('#fastpostmessage').on('focus', function() {
			var obj = $(this);
			if(obj.attr('color') == 'gray') {
				obj.attr('value', '');
				obj.removeClass('grey');
				obj.attr('color', 'black');
				$('#fastpostsubmitline').css('display', 'block');
			}
		})
		.on('blur', function() {
			var obj = $(this);
			if(obj.attr('value') == '') {
				obj.addClass('grey');
				obj.attr('value', '{lang send_reply_fast_tip}');
				obj.attr('color', 'gray');
			}
		});
		<!--{/if}-->
		$('#fastpostsubmit').on('click', function() {
			var msgobj = $('#fastpostmessage');
			if(msgobj.val() == '{lang send_reply_fast_tip}') {
				msgobj.attr('value', '');
			}
			$.ajax({
				type:'POST',
				url:form.attr('action') + '&handlekey=fastpost&loc=1&inajax=1',
				data:form.serialize(),
				dataType:'xml'
			})
			.success(function(s) {
				evalscript(s.lastChild.firstChild.nodeValue);
				window.location.reload();
			})
			.error(function() {
				window.location.href = obj.attr('href');
				popup.close();
			});
			return false;
		});

		$('#replyid').on('click', function() {
			$(document).scrollTop($(document).height());
			$('#fastpostmessage')[0].focus();
		});

	})();

	function succeedhandle_fastpost(locationhref, message, param) {
		var pid = param['pid'];
		var tid = param['tid'];
		if(pid) {
			$.ajax({
				type:'POST',
				url:'forum.php?mod=viewthread&tid=' + tid + '&viewpid=' + pid + '&mobile=2',
				dataType:'xml'
			})
			.success(function(s) {
				$('#post_new').append(s.lastChild.firstChild.nodeValue);
			})
			.error(function() {
				window.location.href = 'forum.php?mod=viewthread&tid=' + tid;
				popup.close();
			});
		} else {
			if(!message) {
				message = '{lang postreplyneedmod}';
			}
			popup.open(message, 'alert');
		}
		$('#fastpostmessage').attr('value', '');
		if(param['sechash']) {
			$('.seccodeimg').click();
		}
	}

	function errorhandle_fastpost(message, param) {
		popup.open(message, 'alert');
	}
</script>
<script type="text/javascript">
$(".vCom").click(function(){
    if($(window).scrollTop()>0){
        $("html,body").animate({scrollTop:0},500);
    }else{
	   $("html,body").animate({scrollTop:$("#reComments").offset().top},500);
    }
});

$(".Jq_viewBtn").click(function(){
	$(".replyCom").slideDown("fast");
	//$(".textarea")[0].focus();
	return false;
});
$(".replyCom form").bind("click",function(){
	$(".replyCom").css("display","block");
	event.stopPropagation();
});
$(".replyCom").bind("click",function(){
	$(this).slideUp("fast");
});
$(".faceBtn").toggle(function(){
	$(".faceBox").show();},
	//$(".fastpost .textarea")[0].focus();
	function(){
	$(".faceBox").hide();}
	//$(".fastpost  .textarea")[0].focus();
);
</script>
